 #***********************************************************************
 #* @file      SConscript
 #* @author    Dave Martin, DeVivo AST, Inc.  
 #* @date      2008/03/03
 #*
 #*  Copyright (C) 2008. DeVivo AST, Inc
 #*
 #*	 This program is free software: you can redistribute it and/or modify  it 
 #*  under the terms of the Jr Middleware Open Source License which can be 
 #*  found at http://www.jrmiddleware.com/osl.html.  This program is 
 #*  distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
 #*  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
 #*  PARTICULAR PURPOSE.  See the Jr Middleware Open Source License for more 
 #*  details.
 #*	
 #*  For more information, please contact DeVivo AST at info@devivoast.com
 #*  or by mail at 2225 Drake Ave, Suite 2, Huntsville, AL  35805.
 #*
 #*  The Jr Middleware Open Source License does not permit incorporating your 
 #*  program into proprietary programs. If this is what you want to do, 
 #*  use the Jr Middleware Commercial License. More information can be 
 #*  found at: http://www.jrmiddleware.com/licensing.html.
 #************************************************************************
 
# Import base environment
import os
Import( 'baseEnv' )

# Define multiple environments for using the library
# as either static or shared
dllenv = baseEnv.Clone()
dllenv.Append( CCFLAGS = ['-D__USE_DLL__'] ) 

# On Windows, use a DLL for the API.
if os.name == "nt":
                                                                
    testapp = dllenv.Program( target = 'jr_test',
							 source = 'jr_test.cpp',
							 LIBS = 'Junior' )
							 
    jrcharapp = dllenv.Program( target = 'jr_char',
							     source = 'jr-char1.cpp',
							     LIBS = 'Junior' )							 
							 

else:
                           
    testapp = baseEnv.Program( target = 'jr_test',
							  source = 'jr_test.cpp',
							  LIBS = 'Junior' )
						  
    jrcharapp = baseEnv.Program( target = 'jr_char',
							  source = 'jr-char1.cpp',
							  LIBS = 'Junior' )
						  

	                                                    
baseEnv.Install( baseEnv['INSTALL_BINDIR'], testapp )
baseEnv.Install( baseEnv['INSTALL_BINDIR'], jrcharapp )
